<template>
	<view>
		<u-navbar back-text="返回" title="消息" :border-bottom="false" :back-text-style="{color: 'rgba(16,142,233,1)' }" back-icon-color="#108EE9">
			<view class="slot-wrap">
				<view class="topBox">
					<view class="top-fill">
						
					</view>
					<view class="clear-all">
						全部已读
					</view>
				</view>
			</view>
		</u-navbar>
		<view class="content">
			<block v-for="(item,index) in list" :key="index">
				<view class="item-box" @click="goDetails(item)">
					<view class="item-left">
						<image src="../../../static/images/home/broadcast.png" mode=""></image>
					</view>
					<view class="item-right">
						<view class="right-title">
							<view class="title-name">
								新用户注册送好礼
							</view>
							<view class="title-time">
								今天 8:00
							</view>
						</view>
						<view class="title-text">
							今日起,分享新用户并注册成功的用户可获得最高666元推荐大礼包,先到先得,快来分享吧!今日起,分享新用户并注册成功的用户可获得最高666元推荐大礼包,先到先得,快
						</view>
					</view>
					<view class="un-read">
						
					</view>
				</view>
			</block>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[1,2,3,4,5,6,6]
			}
		},
		onLoad() {
		},
		onReady() {
		},
		methods: {
			goDetails(){
				this.$u.route({
					url: 'pages/home/message/messageDetails',
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.slot-wrap {
		display: flex;
		align-items: center;
		/* 如果您想让slot内容占满整个导航栏的宽度 */
		/* flex: 1; */
		/* 如果您想让slot内容与导航栏左右有空隙 */
		padding: 0 30rpx;
		width: 100%;
		box-sizing: border-box;
		.topBox {
			width: 100%;
			display: flex;
			.top-fill{
				flex: 1;
			}
			.clear-all{
				font-size:28rpx;
				line-height:44rpx;
				color:rgba(211,176,104,1);
				opacity:1;
			}
		}
	}

	.content {
		padding: 0rpx 30rpx 0;
		width: 100%;
		box-sizing: border-box;
		.item-box{
			display: flex;
			border-bottom: 1rpx solid rgba(223,223,223,1);
			padding-top: 30rpx;
			padding-bottom: 30rpx;
			position: relative;
			.item-left{
				width: 80rpx;
				height: 80rpx;
				margin-right: 30rpx;
				image{
					width: 80rpx;
					height: 80rpx;
				}
			}
			.item-right{
				flex: 1;
				.right-title{
					display: flex;
					justify-content: space-between;
					.title-name{
						font-size:28rpx;
						font-weight:600;
						line-height:36rpx;
						color:rgba(0,0,0,1);
						opacity:1;
					}
					.title-time{
						font-size:22rpx;
						font-weight:400;
						line-height:36rpx;
						color:rgba(0,0,0,1);
						opacity:1;
					}
				}
				.title-text{
					margin-top: 14rpx;
					width: 90%;
					font-size:24rpx;
					font-weight:400;
					line-height:36rpx;
					color:rgba(102,102,102,0.5);
					text-overflow: -o-ellipsis-lastline;
					overflow: hidden;
					text-overflow: ellipsis;
					display: -webkit-box;
					-webkit-line-clamp: 2;
					line-clamp: 2;
					-webkit-box-orient: vertical;
				}
			}
			.un-read{
				position: absolute;
				width:14rpx;
				height:14rpx;
				background:rgba(255,0,0,1);
				border-radius:50%;
				opacity:1;
				right: 0rpx;
				bottom: 0rpx;
				top: 0rpx;
				margin: auto;
			}
		}
	}
</style>
